<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>上海泛软科技有限公司-后台登陆</title>
<meta name="robots" content="nofollow" />
<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>
<link href="/Public/Css/admin-style.css" rel="stylesheet" type="text/css" />
<link href="/Public/Css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/Public/Css/bootstrap.min.css" rel="stylesheet" type="text/css" />


<script language="javascript" type="text/javascript" src="/Public/Js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/admin-common.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/bootstrap.min.js"></script>
<!--<script language="javascript" type="text/javascript" src="/Public/Js/bootstrap.js"></script> -->
<script language="javascript" type="text/javascript" src="/Public/Js/rock_customer_list.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/demo.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/blob.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/FileSaver.min.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/jquery.base64.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/jquery-1.10.2.min.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/tableExport.js"></script>
<script language="javascript" type="text/javascript" src="/Public/Js/xlsx.core.min.js"></script>
</head>

<body>


<script>
$(function(){
	$("tr:even").css('background','#eee')
    $('.status').each(function(){
      alert(45);
    }
})
</script>
<div class="title title-article">订单管理</div>
<style type="text/css">
.sbox{background:#CCC; padding:5px;}
.input{border:#FFF solid 1px;}
option{margin:10px; padding:10px;}
</style>
<!-- <form name="form1" method="post" action="<?php echo U('userquestion');?>">
<ul>
  <li>问题类型</li>
   <li> 
    <select name="typeid" id="typeid">
     <option value="2">专业收费问题</option>
     <option value="3">问卷问题</option>
     <option value="4">专家问题</option>
     </select>
      
     <input type="submit" name="button" id="button" value="确 认">
   </li>
</ul>
 </form> -->
<table class="table" width="100%"  border="0" cellspacing="0" cellpadding="0">
  
 
  <tr class="first">
    <td width="30" align="center" valign="middle">id</td>
    <td width="30" align="center" valign="middle">订单号</td>
    <td width="80" align="left" valign="middle">用户邮箱</td>
    <td width="80" align="center" valign="middle">用户电话</td>
    <td width="80" align="center" valign="middle">订单时间</td> 
    <td width="30" align="center" valign="middle">价格</td>
    <td width="50" align="center" valign="middle" >状态</td>
	  <td width="50" align="center" valign="middle">操作</td>
  </tr>
  <?php if(is_array($userquestion)): $i = 0; $__LIST__ = $userquestion;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><tr>
     <td width="30" align="center" valign="middle"><?php echo ($i); ?></td>
    <td width="30" align="center" valign="middle"><?php echo ($list['order_num']); ?></td>
    <td width="80" align="center" valign="middle"><?php echo ($list['email']); ?></td>
	  <td width="80" align="left" valign="middle"><?php echo ($list['phone']); ?></td>   
    <td width="80" align="center" valign="middle"><?php echo ($list['create_time']); ?></td> 
    <td width="30" align="center" valign="middle"><?php echo ($list['price']); ?></td>    
    <td width="50" align="center" valign="middle" >
      <span class="status">
      <?php echo ($list['order_status']); ?></span>
       <button class="message">
          <a  href="<?php echo U('changestatus','orderid='.$list['id']);?>" onClick="return confirm('确定确定已回复吗？')">设为已回复</a>
        </button>
     
    </td>
 
	  <td width="50" align="center" valign="middle">
     <a class="foundEdit" href="<?php echo U('findOrderDetai','id='.$list['id']);?>">查看详情</a>
    <a class="del" href="<?php echo U('deleteOrder','id='.$list['id']);?>" onClick="return confirm('确定要删除吗？')">删除</a>  
  </td>
  </tr><?php endforeach; endif; else: echo "" ;endif; ?>

</table>

  <?php echo ($page); ?>
<script>

$(document).ready(function(){
   var status1="未付款";
 var status2="已付款,待回复";
 var status3="已回复";
 
    $('.status').each(function(){
      var status=$(this).text();
        if(status==0){
          $(this).text(status1);

        }else if(status==1){
          $(this).text(status2);
        }else if(status==3){
          $(this).text("");
          $(this).siblings('button').text('已回复');
        }


    })
   // $('.message').each(function(){
   //   $(this).click(function(){
   //    var orderid=
   //    alert(11);
   //   })

   // });

})
  

 
</script>
<script type="text/javascript" src="/Public/Js/userquestion.js"> </script>

</body>
</html>